<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>发帖</title>
<script
	src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
	<h3>新话题</h3>
	<form action="">
		<table>
			<tr>
				<td><label>标题</label></td>
				<td><input type="text"></td>
			</tr>
			<tr>
				<td><label>类型</label></td>
				<td><select name="type" id="selectType">
						<c:forEach items="" var="ty">
							<option value="${ty.unumber }">${ty.name}</option>
						</c:forEach>
				</select><a href="/pages/toCreatPostType.action">没有找到，添加一个。</a></td>
			</tr>
			<tr>
				<td><label>内容</label></td>
				<td><input type="text"></td>
			</tr>
			<tr>
				<td><label>上传图片</label></td>
				<td><input type="text"></td>
			</tr>
			<tr>
				<td><label>上传视频</label></td>
				<td><input type="text"></td>
			</tr>
			<tr>
				<td><label>操作</label></td>
				<td><input value="发布" type="submit"></td>
			</tr>
		</table>
	</form>
	<script type="text/javascript">
		$("#addchildren").click(function() {
			$.post("", {
				parentId : $("#addchildren").val()
			}, function(data, status) {
				alert("数据: \n" + data + "\n状态: " + status);
				if (status == "301") {
					$("#addchildren").before("<select ")
				}
			});
		});
	</script>
</body>
</html>